Exercise 10 (Homework 4).
(context-free languages,
ambiguity)
Sufficient conditions for unambiguity
Consider the following conditions for a context-free grammar:
- Every production has at most one non-terminal symbol on its right-hand side.
- The languages generated by two different productions of the same non-terminal symbol are always disjoint.
Show that any context-free grammar satisfying the above conditions must be unambiguous.